package com.neusoft.mid.msf.common.vo;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: pangu
 * @description: 树节点的VO对象
 * @author: fengjd
 * @create: 2022-07-22 08:43
 **/

@Data
public class TreeNode {

    protected int id;
    protected int parentId;

    /**
     * 子节点列表
     */
    private List<TreeNode> children =new ArrayList<>();

    /**
     * 添加节点
     * @param child
     */
    public void add(TreeNode child) {
        children.add(child);
    }
}
